package cn.edu.scau.cmi.linhongyu.client;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import cn.edu.scau.cmi.linhongyu.spring.domain.Student;
import cn.edu.scau.cmi.linhongyu.spring.domain.Student;
import cn.edu.scau.cmi.linhongyu.hibernate.util.ApplicationContextUtil;



public class SpringClient {
	public SpringClient() {
	}

	public static void main(String[] args) {
		ApplicationContext applicationContext = getApplicationContext1();
		Student zhangsan = (Student) applicationContext.getBean("zhangsan");
		System.out.println(zhangsan.getName() + "，的毕业设计指导导师是：" + zhangsan.getTutor().getName());

	}

	private static ApplicationContext getApplicationContext1() {
		ApplicationContext ac1 = new ClassPathXmlApplicationContext("applicationContext.xml");
		return ac1;
	}

}
